from .sqlite_storage import SQLiteStorage
from .csv_storage import CSVStorage
from .mysql_storage import MySQLStorage

class StorageFactory:
    @staticmethod
    def create(storage_type,*args):
        if storage_type == 'sqlite':
            return SQLiteStorage(db_path = 'c:/Users/81576/Desktop/ai_spider/data.db')
        elif storage_type == 'csv':
            return CSVStorage(*args)
        elif storage_type == 'mysql':
            return MySQLStorage()
        raise ValueError(f'Unsupported storage type: {storage_type}')